#pragma once
#include "file_interface.h"
#include "driver/i2s_std.h"
#include "audio_input_interface.h"
#include <memory>


#define EXAMPLE_I2S_BUF_LEN 8192

class WavRecoder
{
private:
    std::shared_ptr<FileInterface> m_file; // 用智能指针持有对象
    std::shared_ptr<AudioInputInterface> m_audio_input; // 用智能指针持有对象
public:
    explicit WavRecoder(std::shared_ptr<FileInterface> file, std::shared_ptr<AudioInputInterface> audio_input);
    esp_err_t record(uint16_t seconds);
};
